For older posts, hit up the Archive or Category links in the right sidebar

 


RescueMyClassicMac.com

Do you need old system software disks to boot your vintage Mac?


MailFromCupertino.com

It's fun to look back at old Apple emails. Check them out.


This site is not affiliated with Apple, Inc.
All company logos and product names may be registered trademarks and are hereby acknowledged.

© 2004-2022 Kevin Rye. All Rights Reserved.

For older posts, hit up the Archive or Category links in the right sidebar

 

AppleToTheCore.me

I'm a total Apple addict, as you might tell.

C64 Maze Code a no-go on the Apple II

On a Commodore 64, the following line of code does something pretty amazing:

10 PRINT CHR$(205.5+RND(1));: GOTO 10

It randomly generates this:

c64code_0001

It looks just like a maze! Cool!

I wanted to see if it worked on my Apple II. Sadly, it just spits out a bunch of M’s and N’s.

I Googled to see why. As it turns out, the "/" and "\" on a C64 are actually graphics characters from the PETSCII character set, and not just slashes. The Apple II doesn’t use the PETSCII character set. If you play around with the code, you can get close, but it’s not as “pretty”.

10 PRINT CHR$(47+(INT(RND(1)+.5)*45));: GOTO 10  

A2mazecode_009

It’s just not the same. The slashes don’t connect, so it doesn’t make for much of a maze.

Oh well. That would have been cool to watch.